import time
from selenium import webdriver
from selenium.webdriver.common.by import By

#name属性一般是用在表单元素上，比如input、button等,实际工作中用得不多

driver=webdriver.Chrome()
driver.maximize_window()
driver.get("https://www.baidu.com")
time.sleep(1)
#百度首页的搜索框的name是wd
driver.find_element(By.NAME,'wd').send_keys('从入门到放弃')
time.sleep(8)
driver.quit()
